<?php
session_cache_expire(999999999);
if(!isset($_SESSION)) 
{ 
session_start(); 
} 
if(!isset($_SESSION['user'])){
	echo "timeout";
}else{
	$username = $_SESSION['fullname'];
	$id_employee = $_SESSION['IDEmployee'];
include '../operations/connection.php';	

$a= (string)(microtime(true)*1000);
$b=split('\.',$a);
$idcommentA= $b[0];

$idtestproject = $_REQUEST['idtestproject'];
$id = $_REQUEST['idproject'];
		if ($_SESSION['lang'] == "EN") {
			include "../value/value_en.php";
		}else if($_SESSION['lang'] == "VN") {
			include "../value/value_vn.php";
		}
		else {
			include "../value/value_kr.php";
		}
//$sqldelete = "DELETE FROM `pr_testproject` WHERE (`IDTest`='$idtestproject')";
$sqldelete="UPDATE `pr_testproject` SET `Delete`='1' WHERE (`IDTest`='$idtestproject')";
mysql_query($sqldelete);

$labelconfirm = $l_deleted."-%$#@!-#424242";

$sqladdcomment = "insert into pr_comment(IDComment,IDTestProject,IDEmployee,`Comment`,DateComment)
 VALUES('$idcommentA','$idtestproject','$id_employee','$labelconfirm',NOW())";
mysql_query($sqladdcomment);

if($username!=""){
	$sqlinserttestpro = "UPDATE pr_testproject SET Comment_Last = '$labelconfirm', NameEmployee_Last = '$username' , DateConfirm = NOW() 	WHERE IDTest = '$idtestproject' ";
	mysql_query($sqlinserttestpro);
}


mysql_close($connection);
}
?>